Trainee doctor guilty of rape